package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JComponent;

public class ActionHomeContact implements ActionListener{

	@Override
	public void actionPerformed(ActionEvent e) {
		String azione = ((JButton)e.getSource()).getName();
		switch (azione){
		case "contatto": {
			int acc_id = Integer.valueOf(((JButton)e.getSource()).getComponent(0).getName());
			Engine.startContactProp(acc_id);
			break;
		}
		}
		((JComponent)e.getSource()).requestFocus();
	}

}
